package com.moli.iov.open.model.vo.req;

import java.io.Serializable;
import java.util.List;
import javax.validation.constraints.Email;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import lombok.Data;

/**
 * <p>
 * 用户业务
 * </p>
 *
 * @author zql
 * @since 2019/9/21 15:27
 */
@Data
public class UserVo extends BaseVo implements Serializable {

  private static final long serialVersionUID = -3538288039764704255L;

  /**
   * 账号
   */
  @NotEmpty(message = "账号不能为空", groups = {UpdatePwd.class, GetUserRoleByAccount.class, OpLogin.class})
  private String account;

  /**
   * 邮箱
   */
  @NotEmpty(message = "邮箱不能为空", groups = {Save.class})
  @Email(message = "邮箱格式错误", groups = {Save.class})
  private String email;

  /**
   * 邮箱集合
   */
  private List<String> emails;

  /**
   * 真实姓名
   */
  @NotEmpty(message = "真实姓名不能为空", groups = {Save.class, Update.class})
  private String realName;

  /**
   * 手机号
   */
  @NotEmpty(message = "手机号不能为空", groups = {Save.class, Update.class})
  private String userPhone;

  /**
   * 账号状态：1、启用 0、禁用
   */
  @NotNull(message = "账号状态不能为空", groups = {Update.class})
  private Integer status;

  /**
   * 角色id
   */
  private Long roleId;

  /**
   * 密码
   */
  @NotEmpty(message = "密码不能为空", groups = {Save.class, UpdatePwd.class})
  private String password;

  /**
   * token
   */
  @NotEmpty(message = "token不能为空", groups = {OpLogin.class})
  private String token;

  public interface Save{}

  public interface Update{}

  public interface UpdatePwd{}

  public interface GetUserRoleByAccount{}

  public interface OpLogin{}
}
